<?php

namespace App\Http\Controllers\Home;

use App\Model\Staff;
use App\Model\Store;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Auth;

class CommonController extends Controller
{
    protected $company_id;
    protected $store_id;
    protected $page;
	protected $store;

    public function __construct()
    {
        $userData = Auth::user();
        $this->company_id = Auth::user()->company_id;
        $staff = new Staff();
	    $this->store=new Store();
//        $staff_id = $staff->where(['id' => $userData['id'], 'type' => 1])->first()->id;
//        $this->store_id = $staff->staff_store($staff_id)->store->id;
	    $storeData=$this->store->department($userData->department);
	    $this->store_id=$storeData['id'];

    }
}
